package com.hs.android.fortress.net;

import java.util.ArrayList;
import java.util.List;

import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONException;
import org.json.JSONObject;

import android.util.Log;

public class ParamsMaker {

	public static final String TAG = ParamsMaker.class.getSimpleName();
	
	public static List<NameValuePair> makeIdParam(String id){
		
		List<NameValuePair> params = new ArrayList<NameValuePair>();
		
		params.add(new BasicNameValuePair("id", id));
		
		return params;
		
	}
	
	public static List<NameValuePair> makeIdPwParams(String id, String pw){
		
		List<NameValuePair> params = new ArrayList<NameValuePair>();
		
		params.add(new BasicNameValuePair("id", id));
		params.add(new BasicNameValuePair("pw", pw));
		
		return params;
		
	}
	
	public static List<NameValuePair> makeCreateRoomParams(String id, String roomName){
		List<NameValuePair> params = new ArrayList<NameValuePair>();
		
		params.add(new BasicNameValuePair("id", id));
		params.add(new BasicNameValuePair("roomName", roomName));
		
		return params;
	}
	

	public static List<NameValuePair> makeRoomNumberParam(int roomNumber){
		List<NameValuePair> params = new ArrayList<NameValuePair>();
		
		params.add(new BasicNameValuePair("number",""+roomNumber));
		
		return params;
	}
	
	public static List<NameValuePair> makeIdNumberParams(String id,int roomNumber){
		List<NameValuePair> params = new ArrayList<NameValuePair>();
		
		params.add(new BasicNameValuePair("id", id));
		params.add(new BasicNameValuePair("number",""+roomNumber));
		
		return params;
	}
	
	public static List<NameValuePair> makeSetTankParams(String id,int tankid){
		List<NameValuePair> params = new ArrayList<NameValuePair>();
		
		params.add(new BasicNameValuePair("id", id));
		params.add(new BasicNameValuePair("tankid",""+tankid));
		
		return params;
	}
	
	public static List<NameValuePair> makeShootParams(String id,int bombId,double lat, double log){
		List<NameValuePair> params = new ArrayList<NameValuePair>();
		
		params.add(new BasicNameValuePair("id", id));
		params.add(new BasicNameValuePair("bombId",""+bombId));
		params.add(new BasicNameValuePair("lat",""+lat));
		params.add(new BasicNameValuePair("log",""+log));
		
		return params;
	}
}
